#include <stdio.h>
int main()
{
    double i = 0;
    scanf("%lf", &i);
    int flag;
    if (i <= 100000)
        flag = 0;
    else if (i > 100000 && i <= 200000)
        flag = 1;
    else if (i > 200000 && i < 400000)
        flag = 2;
    else if (i > 400000 && i <= 600000)
        flag = 3;
    else if (i > 600000 && i <= 1000000)
        flag = 4;
    else
        flag = 5;
    switch (flag)
    {
    case 0:
        i = i * 0.1;
        break;
    case 1:
        i = 100000 * 0.1 + (i - 100000) * 0.075;
        break;
    case 2:
        i = 100000 * 0.1 + 100000 * 0.075 + (i - 200000) * 0.05;
        break;
    case 3:
        i = 100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05 + (i - 400000) * 0.03;
    case 4:
        i = 100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05 + 200000 * 0.03 + (i - 600000) * 0.015;
    case 5:
        i = 100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05 + 200000 * 0.03 + 400000 * 0.015 + (i - 1000000) * 0.01;
        return 0;
    }
    printf("%lf", i);
}